package com.fdb.smcts.redis.redisutil.keys;

import com.fdb.smcts.redis.redisutil.BasePrefix;

import java.util.concurrent.TimeUnit;

/**
 * cus中台使用的缓存前缀: <br>
 * <p>
 * 0.1:caoxin:2019/7/12 9:49: <br>
 * @author caoxin
 * @version 0.1
 * @date 2019/7/12 9:49
 * @since 2019/7/12 9:49
 */
public class CusKey extends BasePrefix {
    // 无超时时间构造器
    public CusKey(String prefix) {
        super(prefix);
    }
    // 有超时时间构造器
    public CusKey(int expireSeconds, String prefix) {
        super(expireSeconds, prefix);
    }
    // 有超时时间单位的构造器
    public CusKey(String prefix,long expireTime, TimeUnit expireTimeUnit) {
        super(prefix,expireTime,expireTimeUnit );
    }

    /**
     * 在下面定义不同的key
     * for example:
     * prefix:表名 ORG_WHITE_LIST_E
     * private static final String ORG_WHITE_LIST_E = "ORG_WHITE_LIST_E";
     * expireTime:
     * private static final int EXPIRE_TIME  = 1;
     * expireTimeUnit:
     * private static final TimeUnit EXPIRE_TIME_UNIT = TimeUnit.DAYS;
     */
    // 机构白名单
    private static final String ORG_WHITE_LIST_E = "ORG_WHITE_LIST_E";
    private static final int ORG_WHITE_LIST_E_EXPIRE_TIME  = 1;
    private static final TimeUnit ORG_WHITE_LIST_E_EXPIRE_TIME_UNIT = TimeUnit.DAYS;
    public static CusKey ORG_WHITE_LIST_E_KEY = new CusKey(ORG_WHITE_LIST_E,ORG_WHITE_LIST_E_EXPIRE_TIME,ORG_WHITE_LIST_E_EXPIRE_TIME_UNIT);

    // 客户白名单
    private static final String CUS_WHITE_LIST_E = "CUS_WHITE_LIST_E";
    private static final int CUS_WHITE_LIST_E_EXPIRE_TIME  = 1;
    private static final TimeUnit CUS_WHITE_LIST_E_EXPIRE_TIME_UNIT = TimeUnit.DAYS;
    public static CusKey CUS_WHITE_LIST_E_KEY = new CusKey(CUS_WHITE_LIST_E,CUS_WHITE_LIST_E_EXPIRE_TIME,CUS_WHITE_LIST_E_EXPIRE_TIME_UNIT);

}
